<template>
  <!-- 外部包裹层，用于设置浅灰色背景，模拟第二个图片的页面背景 -->
  <div class="roof-page-outer-wrapper">
    <!-- 核心内容区域，设置最大宽度并居中 -->
    <div class="roof-page">

      <!-- 头部结构 (保持不变) -->
      <!-- <header class="custom-header">
        <div class="advertorial-bar">
          Advertorial
        </div>
        <div class="logo-offer-bar">
          <div class="logo-container">
            <img 
              src="https://smartlifestyletrends.com/wp-content/uploads/2023/02/SLT-Logo-Blue-300x50.png" 
              alt="Smart Lifestyle Trends Logo"
              class="site-logo"
            />
          </div>
          <div class="trending-offer">
            Trending Internet Offer
          </div>
        </div>
      </header> -->


      <!-- 核心内容：标题、图片和文本 -->
      <div class="content-wrapper">
        <!-- 标题 -->
        <h1 class="roof-title">
          Important Homeowners Notice: How To Save Thousands On A New Roof!
        </h1>
        <p class="roof-disclaimer">
          <!-- Presented by [Partner's Name] -->
        </p>

        <!-- 主图片 -->
        <div class="main-image-container">
          <img 
            src="https://smartlifestyletrends.com/wp-content/uploads/2023/07/78200-Header-768x462.jpg" 
            alt="Couple with new roof" 
            class="main-image"
          >
        </div>

        <!-- 长篇介绍文字 -->
        <div class="intro-text">
          <p class="bold-paragraph">
            ▸ People in need of a new roof are in for a surprise this October
          </p>
          <p>
            Did you know that replacing your old, dirty, and potentially unsafe roof is likely far more affordable than you might think? In addition, replacing your old roof can increase the value of your home dramatically and prevent costly water intrusion issues that can cost you a fortune.
          </p>
          <p>
            If you only contact your local roofing contractor to give you a quote on a new roof, you could potentially be overcharged. The reality is unless you’re actively comparing quotes with multiple roofing contractors, you never truly know that you’re getting the very best price from a reputable, high quality roofing company. Comparing quotes can be tiresome but thankfully, a new AI Powered Roofing Service is changing that.
          </p>
          <p>
            When homeowners visit 
            <a href="#" @click.prevent="redirectToClick" class="text-link">RoofingCosts.org</a> 
            they are able to quickly compare roofing contractors in their area and make them compete for their business. Many users are shocked to see the amazing prices being offered by highly skilled contractors at 
            <a href="#" @click.prevent="redirectToClick" class="text-link">RoofingCosts.org</a>, 
            often far lower than quotes they’ve previously received.
          </p>
        </div>

        <!-- 对比图片 -->
        <div class="comparison-image-container">
          <img 
            src="https://smartlifestyletrends.com/wp-content/uploads/2024/04/a3200-2-1-768x462.jpg" 
            alt="Roof Pricing Comparison" 
            class="comparison-image"
          >
        </div>
        
        <!-- 结论文字 -->
        <div class="conclusion-text">
          <p>
            Every homeowner who currently needs to replace their roof should see what sort of Roofing Contractors are in their zip code simply by signing up at 
            <a href="#" @click.prevent="redirectToClick" class="text-link">RoofingCosts.org</a>. 
            The process is easy and takes just a few minutes.
          </p>
          <p>
            Don’t delay much needed roofing maintenance and repairs until it’s too late. If you believe your roof needs to be replaced, we urge you to visit 
            <a href="#" @click.prevent="redirectToClick" class="text-link">RoofingCosts.org</a> 
            to see all of the options available in your area (you won’t regret it).
          </p>
        </div>

        <!-- 行动号召 -->
        <div class="call-to-action">
          <h2>Want to see how affordable a new roof can be? Here’s how:</h2>
          <p>
            It’s **100% Free** to check your qualify, won’t matter how old your home is.
          </p>
          <p class="bold-link">
            <a href="#" @click.prevent="redirectToClick">Click here to see if you qualify for local discounts »</a>
          </p>
          <p>
            You can spend less time searching, as it only takes a few seconds to see the deals and save money, you can save time by letting us do the heavy lifting for you!
          </p>
        </div>

        <!-- 选择房屋面积部分 - 使用新样式和内容 -->
        <div class="select-square-footage">
          <p class="select-title">Select Your Square Footage:</p>
          <div class="options-grid">
            
            <!-- Option 1: Under 1500 sq. ft. -->
            <div class="option" @click="redirectToClick">
              <div class="icon-placeholder">
                <!-- 实际图片链接待定，此处使用占位图模拟新样式 -->
                <img src="
https://smartlifestyletrends.com/wp-content/plugins/vida-pages//public/images/sq-ft/sm.png" alt="Under 1500 sq. ft. House" class="house-icon">
              </div>
              <p>Under 1500 sq. ft.</p>
            </div>

            <!-- Option 2: 1500–2500 sq. ft. -->
            <div class="option" @click="redirectToClick">
              <div class="icon-placeholder">
                <img src="https://smartlifestyletrends.com/wp-content/plugins/vida-pages//public/images/sq-ft/md.png" alt="1500-2500 sq. ft. House" class="house-icon">
              </div>
              <p>1500–2500 sq. ft.</p>
            </div>

            <!-- Option 3: 2500–3500 sq. ft. -->
            <div class="option" @click="redirectToClick">
              <div class="icon-placeholder">
                <img src="https://smartlifestyletrends.com/wp-content/plugins/vida-pages//public/images/sq-ft/lg.png" alt="2500-3500 sq. ft. House" class="house-icon">
              </div>
              <p>2500–3500 sq. ft.</p>
            </div>

            <!-- Option 4: 3500+ sq. ft. -->
            <div class="option" @click="redirectToClick">
              <div class="icon-placeholder">
                <img src="https://smartlifestyletrends.com/wp-content/plugins/vida-pages//public/images/sq-ft/xl.png" alt="3500+ sq. ft. House" class="house-icon">
              </div>
              <p>3500+ sq. ft.</p>
            </div>
          </div>
        </div>

        <!-- 底部红色按钮 -->
        <button class="roof-btn final-btn" @click="redirectToClick">
          GET QUESTION NOW!
        </button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'RoofReplacementPage',
     metaInfo: {
    meta: [
      {
        'http-equiv': 'delegate-ch',
        content: 'sec-ch-ua https://cheputyaimunting.com; sec-ch-ua-mobile https://cheputyaimunting.com; sec-ch-ua-arch https://cheputyaimunting.com; sec-ch-ua-model https://cheputyaimunting.com; sec-ch-ua-platform https://cheputyaimunting.com; sec-ch-ua-platform-version https://cheputyaimunting.com; sec-ch-ua-bitness https://cheputyaimunting.com; sec-ch-ua-full-version-list https://cheputyaimunting.com; sec-ch-ua-full-version https://cheputyaimunting.com'
      }
    ],
    style: [
      { type: 'text/css', cssText: '.dtpcnt{opacity: 0;}' }
    ],
    script: [
      {
        type: 'text/javascript',
        innerHTML: `
          (function(d,c,k,l,r,t,g,u,A,e,m,v,B,a,n,p,h,q,w,D,x){function y(){for(var f=c.querySelectorAll(".dtpcnt"),b=0,a=f.length;b<a;b++)f[b][u]=f[b][u].replace(/(^|\\s+)dtpcnt($|\\s+)/g,"")}function C(a,b,d,e){var f=new Date;f.setTime(f.getTime()+(e||864E5));c.cookie=a+"="+b+"; "+d+"samesite=Strict; expires="+f.toGMTString()+"; path=/";k.setItem(a,b);k.setItem(a+"-expires",f.getTime())}function z(a){var b=c.cookie.match(new RegExp("(^| )"+a+"=([^;]+)"));return b?b.pop():k.getItem(a+"-expires")&&+k.getItem(a+
"-expires")>(new Date).getTime()?k.getItem(a):null}x=":"===d.location.protocol?"secure; ":"";d[e]||(d[e]=function(){(d[e].q=d[e].q||[]).push(arguments)},p=c[r],c[r]=function(){p&&p.apply(this,arguments);if(d[e]&&!d[e].hasOwnProperty("params")&&/loaded|interactive|complete/.test(c.readyState))for(;a=c[t][m++];)/\\/?click\\/?($|(\\/[0-9]+)?$)/.test(a.pathname)&&(a[g]="javascrip"+d.postMessage.toString().slice(4,5)+":"+e+'.l="'+a[g]+'",void 0')},setTimeout(function(){(q=/[?&]cpid(=([^&#]*)|&|#|$)/.exec(d.location.href))&&
q[2]&&(h=q[2],w=z("vl-"+h));var f=z("vl-cep"),b=location[g];if("savedCep"===B&&f&&(!h||"undefined"===typeof h)&&0>b.indexOf("cep=")){var e=-1<b.indexOf("?")?"&":"?";b+=e+f}a=c.createElement("script");n=c.scripts[0];a.defer=1;a.src=v+(-1===v.indexOf("?")?"?":"&")+"lpref="+l(c.referrer)+"&lpurl="+l(b)+"&lpt="+l(c.title)+"&vtm="+(new Date).getTime()+(w?"&uw=no":"");a[A]=function(){for(m=0;a=c[t][m++];)/dtpCallback\\.l/.test(a[g])&&(a[g]=decodeURIComponent(a[g]).match(/dtpCallback\\.l="([^"]+)/)[1]);y()};
n.parentNode.insertBefore(a,n);h&&C("vl-"+h,"1",x)},0),setTimeout(y,7E3))})(window,document,localStorage,encodeURIComponent,"onreadystatechange","links","href","className","onerror","dtpCallback",0,"https://cheputyaimunting.com/d/.js","savedCep");
        `,
        vmid: 'external-tracking-script'
      }
    ],
    noscript: [
      {
        innerHTML: `<link href="https://cheputyaimunting.com/d/.js?noscript=true&lpurl=" rel="stylesheet"/>`
      }
    ]
  },
  methods: {
    redirectToClick() {
      const url = 'https://cheputyaimunting.com/click';
      console.log('Redirecting to:', url);
      window.location.href = url;
    },
  }
};
</script>

<style scoped>
/* ======================== 头部样式 (保持不变) ======================== */
.custom-header {
  width: 100%;
  margin-bottom: 30px; 
}
.advertorial-bar {
  background-color: #4169e1; 
  color: white;
  text-align: center;
  font-size: 0.85em;
  padding: 8px 0;
  font-weight: 500;
}
.logo-offer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px; 
  border-bottom: 1px solid #e0e0e0; 
}
.logo-container {
  display: flex;
  align-items: center;
}
.site-logo {
    max-height: 25px; 
    width: auto;
}
.trending-offer {
  font-size: 0.9em;
  color: #777777;
}

/* ======================== 页面基础样式 (保持不变) ======================== */
.roof-page-outer-wrapper {
  background-color: #f2f2f2; 
  min-height: 100vh;
  padding: 10px 0 50px;
}
.roof-page {
  font-family: Arial, sans-serif;
  max-width: 750px; 
  width: 95%;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 0 0 30px 0; 
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); 
}
.content-wrapper {
  padding: 0 30px;
  text-align: center;
}
.roof-title {
  font-size: 1.8em;
  font-weight: 700;
  color: #333333;
  margin-bottom: 5px;
  line-height: 1.2;
}
.roof-disclaimer {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 20px;
}
.main-image-container {
  margin-bottom: 30px;
}
.main-image {
  width: 100%;
  height: auto;
  display: block;
}
.intro-text, .conclusion-text {
  text-align: left;
  font-size: 1em;
  color: #444444;
  line-height: 1.6;
}
.intro-text p, .conclusion-text p {
  margin-bottom: 15px;
}
.bold-paragraph {
  font-weight: 700;
  color: #000000;
}
.text-link {
    color: #cc0000;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.text-link:hover {
    color: #aa0000;
}
.comparison-image-container {
  margin: 30px 0;
  text-align: center;
}
.comparison-image {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border: 1px solid #ccc; 
}
.call-to-action {
  text-align: left;
  margin: 40px 0;
  padding: 15px 0;
  border-top: 1px dotted #ccc;
  border-bottom: 1px dotted #ccc;
}
.call-to-action h2 {
  font-size: 1.2em;
  font-weight: 700;
  color: #000000;
  margin-bottom: 10px;
}
.call-to-action p {
  margin-bottom: 10px;
}
.call-to-action p strong {
  color: #cc0000;
}
.bold-link a {
  font-weight: 700;
  color: #cc0000; 
  text-decoration: underline;
  cursor: pointer;
}
.bold-link a:hover {
  color: #aa0000;
}

/* ======================== 房屋面积选择器 (更新样式) START ======================== */
.select-square-footage {
  margin: 30px 0;
  text-align: center;
}
.select-title {
  font-size: 1.3em; /* 略微增大字号 */
  font-weight: 700;
  color: #000000;
  margin-bottom: 25px;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 列布局 */
  gap: 20px;
  max-width: 600px; /* 限制网格最大宽度并居中 */
  margin: 0 auto;
}
.option {
  width: 100%;
  padding: 20px 10px;
  
  /* 新样式 */
  background-color: #ffffff;
  border: 1px solid #e0e0f0; /* 浅蓝色边框 */
  border-radius: 12px; /* 圆角 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* 柔和阴影 */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.option:hover {
  transform: translateY(-2px); /* 悬停抬升效果 */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border-color: #4169e1; /* 悬停时边框变深蓝色 */
}

.icon-placeholder {
    margin-bottom: 10px;
}
.house-icon {
    /* 调整图片大小以适应新的卡片布局 */
    max-width: 100px;
    height: auto;
}

.option p {
  font-size: 1em;
  margin-top: 5px;
  font-weight: 600; /* 略微粗体 */
  color: #333333;
}
/* ======================== 房屋面积选择器 (更新样式) END ======================== */


/* 底部红色按钮 */
.roof-btn {
  display: block;
  width: 90%;
  max-width: 450px;
  margin: 30px auto;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  background-color: #cc0000; 
  color: #ffffff;
  font-size: 1.2em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(204, 0, 0, 0.4);
  transition: background-color 0.3s;
  text-transform: uppercase;
}
.roof-btn:hover {
  background-color: #aa0000;
}

/* 针对移动设备的响应式调整 */
@media (max-width: 600px) {
    .content-wrapper {
        padding: 0 15px;
    }
    .roof-page {
        width: 100%;
        padding: 0;
        box-shadow: none;
    }
    .logo-offer-bar {
        padding: 15px; 
    }
    .site-logo {
        max-height: 20px;
    }
    .trending-offer {
        font-size: 0.8em;
    }
    .options-grid {
        grid-template-columns: 1fr; /* 移动端改为单列 */
        gap: 15px;
        max-width: 300px; /* 限制单列卡片宽度 */
    }
    .roof-btn {
        width: 95%;
    }
}
</style>